package cmd

import (
	"github.com/spf13/cobra"

	"gitee.com/flyspace81/secure-cli/base"
)

type SecureDataBean struct {
	AppName   string
	Name      string
	Level     string
	ips       []string
	Ip        string
	Type      string
	CvsId     string
	CvssScore float64
	Desc      string
	Support   string
}

const helloAnalysisHwSecure = `
解析华为的资产漏洞分析报告    secure hws -w dir
`

//NewCmdInit ucloud init
func NewCmdAnalysisHwSecure() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "hws",
		Short: "解析华为的资产漏洞分析报告",
		Long:  `解析华为的资产漏洞分析报告`,
		Run: func(cmd *cobra.Command, args []string) {
			if global.WorkDir != "" {
				base.Cxt.Println(global.WorkDir)
			} else {
				cmd.HelpFunc()(cmd, args)
			}
		},
	}

	cmd.Flags().StringVarP(&global.WorkDir, "workdir", "w", global.WorkDir, "working directory")
	cmd.SetHelpTemplate(helpTmpl)
	cmd.SetUsageTemplate(usageTmpl)
	resetHelpFunc(cmd)

	return cmd
}

func printHelloAnalysisHwSecure() {
	base.Cxt.Println(helloAnalysisHwSecure)
}
